var copyTabURL = {};

copyTabURL.execute = function _execute(aTab) {
	if (aTab.localName != "tab") {
		aTab = gBrowser.mCurrentTab;
	}
	var URL = gBrowser.getBrowserForTab(aTab).contentDocument.location;

	var clipboard = Components.classes["@mozilla.org/widget/clipboardhelper;1"].getService(Components.interfaces.nsIClipboardHelper);
	clipboard.copyString(URL);
};
